<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>求字符串数组中每一项的长度</title>
</head>
<body>
    <script>
        var array = [];
        var arr =new Array(5 ,1 ,0 ,5);
        for(var i = 0;i < arr.length;i++ ){
            array[arr.length] = parseInt(arr[i].length);
        }
        console.log(arr);
    </script>
</body>
</html>